<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script type="text/javascript">
function altRows(id){
	if(document.getElementsByTagName){  
		
		var table = document.getElementById(id);  
		var rows = table.getElementsByTagName("tr"); 
		 
		for(i = 0; i < rows.length; i++){          
			if(i % 2 == 0){
				rows[i].className = "evenrowcolor";
			}else{
				rows[i].className = "oddrowcolor";
			}      
		}
	}
}
window.onload=function(){
	altRows('alternatecolor');
}
</script>
<link href="table.css" rel="stylesheet" type="text/css" />
</head>
<body>
<body>
<center><table border=2 class="altrowstable" id="alternatecolor">
<tr>
<?php 
include 'session/session.php';
include 'database/connect.php';
$user = $_SESSION['logged'];
$query="SELECT b.email, b.pytanie, b.odpowiedz, a.imie, a.nazwisko, a.nr_prawa, a.pelny_tytul, a.ulica, a.nr_domu, a.nr_mieszkania, a.miasto, a.kod_pocztowy, a.nr_telefonu FROM lekarz a JOIN user b ON a.id_user=b.ID WHERE b.login='".$user."'";
$result = mysql_query($query,$link);
$r = mysql_fetch_array($result);
echo "<h1>Twoje dane: </h1><br><br>";
echo "<tr><td>Email: </td>"."<td>".$r[0]."</td></tr>";
echo "<tr><td>Imię: </td>"."<td>".$r[3]."</td></tr>";
echo "<tr><td>Nazwisko: </td>"."<td>".$r[4]."</td></tr>";
echo "<tr><td>Numer prawa do zawodu: </td>"."<td>".$r[5]."</td></tr>";
echo "<tr><td>Pełny tytuł: </td>"."<td>".$r[6]."</td></tr>";
echo "<tr><td>Ulica: </td>"."<td>".$r[7]."</td></tr>";
echo "<tr><td>Nr domu: </td>"."<td>".$r[8]."</td></tr>";
echo "<tr><td>Nr mieszkania: </td>"."<td>".$r[9]."</td></tr>";
echo "<tr><td>Kod pocztowy: </td>"."<td>".$r[11]."</td></tr>";
echo "<tr><td>Miasto: </td>"."<td>".$r[10]."</td></tr>";
echo "<tr><td>Telefon: </td>"."<td>".$r[12]."</td></tr>";
echo "<tr><td>Pytanie do hasła: </td>"."<td>".$r[1]."</td></tr>";
echo "<tr><td>Odpowiedz: </td>"."<td>".$r[2]."</td></tr>";
?>
</tr>
</table>
<br />
 
</body>
</html>
